#include<bits/stdc++.h>
#define int long long
const long long N=100050;
using namespace std;
int in[10000];
signed main(){
	freopen("employ.in","r",stdin);
	freopen("employ.out","r",stdout);
	int a,b;
	cin>>a>>b;
	in[2]=2
	in[5]=2204128;
	in[47]=161088479;
	in[1]=515058943;
	in[12]=225301405;
	cout<<in[b];
	return 0;
}


